﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>MonitorGetPrimary - 语法 &amp; 使用 | AutoHotkey v2</title>
<meta name="description" content="The MonitorGetPrimary function returns the number of the primary monitor." />
<meta name="ahk:equiv-v1" content="lib/SysGet.htm#MonitorPrimary" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>MonitorGetPrimary</h1>

<p>返回主监视器的编号.</p>

<pre class="Syntax">Primary := <span class="func">MonitorGetPrimary</span>()</pre>

<h2 id="Parameters">参数</h2>
<p>此函数没有参数.</p>

<h2 id="Return_Value">返回值</h2>
<p>类型: <a href="../Concepts.htm#numbers">整数</a></p>
<p>此函数返回主显示器的编号. 在一个单一监视器系统中, 这将总是 1.</p>

<h2 id="Related">相关</h2>
<p><a href="SysGet.htm">SysGet</a>, <a href="Monitor.htm">监视器函数</a></p>

<h2 id="Examples">示例</h2>
<p>有关此函数的演示, 请参阅<a href="Monitor.htm">监视器函数</a>页面的<a href="Monitor.htm#ExLoopAll">示例 #1</a>.</p>

</body>
</html>